#pragma once

#include "glare.gles2.Prerequisites.h"

#include "glare.core.Box.h"
#include "glare.core.GpuResource.h"
#include "glare.core.GpuBufferDescription.h"
#include "glare.core.GpuResourceFactory.h"

namespace Glare {

	class GLES2GpuResourceInterface : public GpuResource::Interface
	{
	public : virtual const GLuint& GetGLES2Id() const = 0;
	public : virtual void _UpdateImpl(const uint& dest_sub_resource, Box* dest_box, const void* src_data, const uint& src_row_pitch, const uint& src_depth_pitch) = 0;
	};

	class GLES2GpuResourceFactory : public GpuResourceFactory
	{
	public : GLES2GpuResourceFactory(GLES2Driver* driver);

	public : virtual GpuBuffer* CreateBuffer(const GpuBufferDescription& description);
	public : virtual Texture* CreateTexture(const TextureDescription& description);

	public : virtual ShaderResourceView* CreateShaderResourceView(GpuResource* resource, const ShaderResourceViewDescription& description);

	public : virtual Driver* GetDriver() const;

	public : GLES2Driver* _driver;
	};
}
